using KL.Standard.Model.Infrastructure;
using KL.Standard.Model.Models.BaseArch;
using KL.Standard.Model.ViewModels.OutResult;

namespace KL.Standard.Domain.Repositories;

public interface IUserRepository
{
    /// <summary>
    /// 初始密码
    /// </summary>
    /// <param name="loginIdArray"></param>
    /// <returns></returns>
    int RestPwd(string[] loginIdArray);
    /// <summary>
    /// 删除
    /// </summary>
    /// <param name="loginIdArray"></param>
    /// <returns></returns>
    int Delete(string[] loginIdArray);
    /// <summary>
    /// 上锁某个账号
    /// </summary>
    /// <param name="loginId"></param>
    /// <returns></returns>
    int Lock(string loginId);
    /// <summary>
    /// 更新用户信息
    /// </summary>
    /// <param name="userInfo"></param>
    /// <returns></returns>
    int UpdateLoginInfo(SysAccountPO userInfo);
    /// <summary>
    /// 通过账号获取详细信息
    /// </summary>
    /// <param name="pLoginId"></param>
    /// <returns></returns>
    AccountVM QueryUserInfo(string pLoginId);
    /// <summary>
    /// 分页
    /// </summary>
    /// <param name="searchInfo"></param>
    /// <returns></returns>
    Task<PageResult<AccountVM>> SearchPage(PageSearchModel searchInfo);
    /// <summary>
    /// 是否已经存在
    /// </summary>
    /// <param name="info"></param>
    /// <returns></returns>
    bool IsExist(SysAccountPO info);
    /// <summary>
    /// 保存账号
    /// </summary>
    /// <param name="info"></param>
    /// <returns></returns>
    long SaveInfo(SysAccountPO info);
    /// <summary>
    /// 保存账号（中台发起）
    /// </summary>
    /// <param name="msg"></param>
    /// <returns></returns>
    int SaveInfo4ZT(SysAccountPO msg);
    /// <summary>
    /// 更新密码
    /// </summary>
    /// <param name="loginId"></param>
    /// <param name="md5"></param>
    /// <returns></returns>
    int UpdateNewPwd(string loginId, string md5);
}